const process1 = require("child_process");
module.exports = () => {
  console.log("项目模版下载 ...");
  process1.exec("which node", (err, stdout, stderr) => {
    process1.exec(
      `cross-env NODE_ENV=development node ${stdout}/server`,
      function(error, stdout, stderr) {
        if (error !== null) {
          console.log("exec error: " + error);
          return;
        }
        console.log(stdout);
        console.log("clone success");
      }
    );
  });
};
